package com.strong.task1.mr;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;

import java.io.IOException;

public class WordSortMapper extends Mapper<LongWritable, Text, LongWritable, NullWritable> {
    LongWritable k = new LongWritable();

    @Override
    protected void map(LongWritable key, Text value, Context context) throws IOException, InterruptedException {
        k.set(Long.parseLong(value.toString()));
        context.write(k, NullWritable.get());
    }
}
